package com.guaju.yueshangLife.utils;

import android.text.TextUtils;
import android.webkit.WebView;

public class WebViewUtil {

    public static void loadData(WebView wv, String htmlInfo) {
        if (!TextUtils.isEmpty(htmlInfo)) {
            String head = "<head><style>* {font-size:17px}{color:#212121;}img{max-width: 100%; width:auto; height: auto;}</style></head>";
            String resultStr = "<html>" + head + "<body>" + htmlInfo + "</body></html>";
            wv.loadDataWithBaseURL(null, resultStr, "text/html", "utf-8", null);
        }
    }

}